home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS075.dsk
/
HOOVER DAM.int
< prev
next >
Wrap
Text File
|
2012-02-16
|
16KB
|
410 lines
0 DIM WTER(6),CAP(10),TRB(5),TURB(5),CAPA(5)
5 TB=TFIX=CB=CFIX=I=J=K=L=DE=OP=TFIX1=CFIX1=LEAK=LEAKER=F=FIX=VLV=LEAK=PRES=ELEC=DMND=DEAD=MON=D=H=M=PWER=-1111
10 DIM A$(255)
11 REM TURB(I)=TURB FAIL COUNT
13 REM CFIX=IF A CAP IS REPAIRING
15 REM VLV=VALVE IN VIEW #2
17 REM D=DAY
20 REM A$=INITAILISING STRING
21 REM AND USED FOR VIEW #7
23 REM AS THE FILENAME
25 REM OP=IF THE PLANT OPERATES
27 REM H=HOUR
30 REM CAPA(I)=CAP FAIL COUNT
31 REM PWER=IF TURBS GENERATE ELEC
33 REM CFIX1=WHICH CAP IS FIXING
35 REM CONT HAPPENS EVERY "MINUTE"
37 REM M=MINUTE
40 REM TFIX1=WHICH TURB IS FIXING
41 REM WTER=WATER LEVEL FROM LEAKS
43 REM LEAKER=LEAK MAKING COUNT
45 REM TB=IF A TURBINE IS BROKEN
47 REM KBI=INPUT A CHAR
50 REM PRES=PRESSURE BEHING THE DAM
51 REM WTER(1-6)=COLOR OF GROUND
53 REM F=IF A LEAK IS BEING FIXED
55 REM CB=IF A CAPACITOR IS BROKEN
57 REM KB=$C000
60 REM LEAK=NUMBER OF LEAKS
63 REM FIX=LEAK FIXING COUNT
65 REM I,J,K, AND L ARE TEMPORARY
67 REM KBSTRB=$C010
70 REM ELEC=ELECTRICAL OUTPUT
73 REM DEAD=NUMBER OF DROWNED
75 REM DE=NUBER WHO JUST DROWNED
77 REM CAP(I)=CAP'S COLOR
80 REM DMND=ELECTRICAL DEMAND ( NEED )
83 REM MON=HOW MUCH MONEY
85 REM TFIX=IF A TURB IS REPAIRING
87 REM TRB(I)=TURBINE'S COLOR
90 KBI=200:KB=-16384:KBSTRB=-16368
95 CONT=10000
99 GOTO 32000
100 TEXT :CALL -936
101 CONT=10000
105 CALL -380
107 TAB 12:PRINT "------------------"
110 TAB 12:PRINT "! HOOVER DAM !"
113 TAB 12:PRINT "! !"
115 TAB 12:PRINT "! MAIN MENU !"
116 TAB 12:PRINT "! !"
117 TAB 12:PRINT "------------------"
119 PRINT :PRINT
120 TAB 7:PRINT "1 - DAM SURFACE (OUTSIDE VIEW)"
125 PRINT
130 TAB 7:PRINT "2 - TURBINES"
135 PRINT
140 TAB 7:PRINT "3 - POWER STORAGE ROOM"
145 PRINT
150 TAB 7:PRINT "4 - FINANCIAL STATUS"
155 PRINT
160 TAB 7:PRINT "5 - OPERATING STATUS"
165 PRINT
170 TAB 7:PRINT "6 - ABORT"
175 PRINT
180 TAB 7:PRINT "7 - LOAD/SAVE GAME"
185 VIEW=0
190 GOSUB KBI:GOTO 190
200 REM LOOK FOR KEYBOARD INPUT
210 REM IF AUTO=1 THEN TAKE INPUT
220 REM FROM "A$"
230 IF AUT=1 THEN 250
240 GOSUB CONT:IF UPDTE THEN 297:K= PEEK (KB):IF K<128 THEN 240: POKE KBSTRB,0:GOTO 265
250 REM TAKE FROM A$
255 AU=AU+1:IF AU= LEN(A$)+1 THEN 296
260 K= ASC(A$(AU,AU))
265 IF K= ASC("M") THEN 299
270 REM TAKE CHAR AU FOR "A$"
280 REM K CONTAINS ASCII CHAR
285 VIEW=K-176:IF VIEW>0 AND VIEW<8 THEN 287:GOTO 295
287 CONT=10000
290 POP :TEXT :CALL -936:GOTO VIEW*1000
295 IF K#141 AND K#176 THEN RETURN :POP :GOTO 100
296 AU=0:AUT=0:POP :GOTO 100
297 UPDTE=0:RETURN
299 OP=NOT OP:GOTO 200
300 GR :FOR I=1 TO 7:COLOR= 6:HLIN 0,39 AT I:NEXT I
305 CALL -936
310 FOR I=8 TO 33:COLOR= 15:HLIN 5,34 AT I:NEXT I
320 COLOR= 10:HLIN 5,34 AT 7:FOR I=1 TO 4:COLOR= 9:VLIN 3,7 AT I+17:NEXT I
330 COLOR= 8
340 FOR I=5 TO 39:HLIN 0,4 AT I:HLIN 35,39 AT I:NEXT I
350 FOR I=1 TO 6:COLOR= WTER(I):HLIN 5,34 AT I+33:NEXT I
360 COLOR= 2
370 IF LEAK THEN 380:GOTO 400
380 FOR I=1 TO LEAK
382 Y=13:Y=Y+5*(I/10):X=7:X=X+2*(I MOD 10)
383 VLIN Y,Y+4 AT X
390 NEXT I
400 REM TOO MANY LEAKS,DAM BUSTS
410 FOR I=3 TO 39:COLOR= 2:HLIN 3,36 AT I:PRINT "<CTRL-G>";:NEXT I
415 DE= RND (2000)+250:DEAD=DEAD+DE
420 FOR J=1 TO 200:NEXT J:TEXT :CALL -936:PRINT "YOU BUSTED THE DAM!"
430 GOTO 6030
500 GR :FOR I=1 TO 7:COLOR= 6:HLIN 0,39 AT I:NEXT I
505 CALL -936
510 FOR I=8 TO 33:COLOR= 15:HLIN 5,34 AT I:NEXT I
520 COLOR= 10:HLIN 5,34 AT 7:FOR I=1 TO 4:COLOR= 9:VLIN 3,7 AT I+17:NEXT I
530 COLOR= 8
540 FOR I=5 TO 39:HLIN 0,4 AT I:HLIN 35,39 AT I:NEXT I
550 FOR I=1 TO 6:COLOR= WTER(I):HLIN 5,34 AT I+33:NEXT I
560 COLOR= 2
570 IF LEAK THEN 580:GOTO 600
580 FOR I=1 TO LEAK
582 Y=13:Y=Y+5*(I/10):X=7:X=X+2*(I MOD 10)
583 VLIN Y,Y+4 AT X
590 NEXT I
600 Y=7:X=19
610 FOR I=1 TO 5:COLOR= 1:HLIN X,X+1 AT Y:HLIN 39-X,39-X+1 AT Y:Y=Y-1:X=X-1:CALL -1055:NEXT I
620 COLOR= 2
630 X=10:X1=9
640 FOR Y=8 TO 33 STEP 2
650 I=Y MOD 3:RX=X:IF I=1 THEN RX=X1:VLIN Y,Y+1 AT RX:VLIN Y,Y+1 AT 39-RX: POKE -16336, PEEK (-16336)
655 VLIN Y,Y+1 AT RX+9
656 NEXT Y
700 GOTO 400
1000 GR :FOR I=1 TO 7:COLOR= 6:HLIN 0,39 AT I:NEXT I
1010 FOR I=8 TO 33:COLOR= 15:HLIN 5,34 AT I:NEXT I
1015 COLOR= 10:HLIN 5,34 AT 7:FOR I=1 TO 4:COLOR= 9:VLIN 3,7 AT I+17:NEXT I
1016 COLOR= 8
1020 FOR I=5 TO 39:HLIN 0,4 AT I:HLIN 35,39 AT I:NEXT I
1030 FOR I=1 TO 6:COLOR= WTER(I):HLIN 5,34 AT I+33:NEXT I
1035 COLOR= 2
1040 IF LEAK THEN 1050:GOTO 1070
1050 FOR I=1 TO LEAK
1052 Y=13:Y=Y+5*(I/10):X=7:X=X+2*(I MOD 10)
1053 VLIN Y,Y+4 AT X
1060 NEXT I
1065 VIEW=1
1070 GOSUB KBI:IF K= ASC("F") AND NOT F AND LEAK THEN F=1:GOTO 1065
2000 GR
2001 GOSUB 2002:GOTO 2080
2002 VIEW=2
2003 IF VLV=1 THEN C=15:IF VLV=0 THEN C=6
2005 TRBN=0
2006 YY=39:VTAB 21:TAB 1
2007 PRINT " V A B C D E"
2008 CALL -958
2009 TURB=0
2010 FOR I=1 TO 5:Y=3:X=I*6:FOR J=X TO X+4:COLOR= TRB(I):IF C=6 THEN COLOR= 8:IF TRB(I)=9 THEN COLOR= 9:VLIN Y,Y+4 AT J:NEXT J
2025 IF TRB(I)=8 OR TRB(I)=9 THEN TRBN=TRBN+1:TURB=5-TRBN:PWER=(NOT NOT TURB)*VLV
2026 IF TRB(I)=12 AND X<YY THEN YY=X
2027 COLOR= 2:IF C=6 OR TRB(I)=9 THEN COLOR= 10
2030 IF TRB(I)=8 THEN COLOR= 10:VLIN 8,20 AT I*6+2:COLOR= 1:IF TRB(I)=12 AND C=15 THEN COLOR= 13:VLIN 1,2 AT I*6+2:NEXT I
2031 COLOR= 2:HLIN 0,4 AT 21:IF C=6 THEN COLOR= 10:HLIN 6,32 AT 21
2035 IF TRBN=5 THEN 2040:GOTO 2050
2040 COLOR= 1:HLIN 8,39 AT 0:GOTO 2065
2050 IF TRB(1)=12 THEN 2051:GOTO 2055
2051 COLOR= 13:IF C=6 THEN COLOR= 1:HLIN 8,39 AT 0:GOTO 2065
2055 COLOR= 1:HLIN 8,YY+1 AT 0:COLOR= 13:IF C=6 THEN COLOR= 1:HLIN YY+2,39 AT 0
2060 REM DRAW TURBINES AND POWER CABLES
2065 REM
2070 COLOR= C:PLOT 5,21
2075 RETURN
2080 VIEW=2:GOSUB KBI:IF (K< ASC("A") OR K> ASC("E")) AND K# ASC("V") THEN 2080
2090 IF K= ASC("V") THEN 2100:K=K-192:GOTO 2110
2100 VLV=NOT VLV:GOTO 2001
2110 IF TRB(K)=9 THEN 2120:GOTO 2150
2120 IF TFIX THEN 2140:TFIX=1
2130 TFIX1=K
2140 GOTO 2080
2150 IF TRB(K)=8 THEN 2160:GOTO 2170
2160 TRB(K)=12:IF VLV THEN 2001:GOTO 2080
2170 TRB(K)=8:IF VLV THEN 2001:GOTO 2080
3000 GR
3001 GOSUB 3003:GOTO 3100
3003 VTAB 21:TAB 1
3005 PRINT " A B C D E":CALL -958
3010 FOR I=1 TO 5:X=(I-1)*7+4:Y=5:COLOR= CAP(I):IF PWER=0 THEN COLOR= 8:FOR J=X TO X+5:VLIN Y,Y+8 AT J:NEXT J
3015 COLOR= 1
3020 IF CAP(I)=15 AND PWER THEN COLOR= 13
3025 VLIN 1,4 AT X+3:COLOR= 1:IF PWER AND CAP(I)=15 THEN COLOR= 13:VLIN 14,25 AT X+3:NEXT I
3030 COLOR= 1+PWER*12:HLIN 0,6 AT 0
3040 IF NOT PWER THEN 3050:GOTO 3060
3050 COLOR= 1:HLIN 7,35 AT 0:HLIN 7,39 AT 26:GOTO 3100
3060 J=1:FOR I=1 TO 5:IF CAP(I)=15 THEN J=I:NEXT I
3065 COLOR= 13:HLIN 7,(J-1)*7+7 AT 0:IF CAP(5)=15 THEN 3070:COLOR= 1:HLIN (J-1)*7+8,35 AT 0
3070 IF CAP(1)=15 THEN 3080:GOTO 3090
3080 COLOR= 13:HLIN 7,39 AT 26:GOTO 3095
3090 J=6:FOR I=1 TO 5:IF CAP(I)=15 AND I<J THEN J=I:NEXT I:IF J=6 THEN 3091:GOTO 3093
3091 COLOR= 1:HLIN 7,39 AT 26:HLIN 7,35 AT 0:GOTO 3095
3093 COLOR= 1:HLIN 7,(J-1)*7+6 AT 26:COLOR= 13:HLIN (J-1)*7+7,39 AT 26:
3095 RETURN
3100 VIEW=3:GOSUB KBI:K=K- ASC("@"):IF K<1 OR K>5 THEN 3100
3110 IF CAP(K)=9 THEN 3115:GOTO 3130
3115 IF CFIX THEN 3100
3120 CFIX=1:CFIX1=K:GOTO 3100
3130 IF CAP(K)=15 THEN 3150
3140 CAP(K)=15:IF NOT PWER THEN 3100:GOTO 3001
3150 CAP(K)=8:IF NOT PWER THEN 3100:GOTO 3001
4000 VTAB 1:TAB 1:PRINT "FINANCIAL STATUS IS:::"
4010 PRINT :PRINT
4020 IF MON=0 THEN 4030:GOTO 4040
4030 PRINT "YOU HAVE NOT MADE OR LOST ANYTHING!":GOTO 4100
4040 PRINT "YOU ARE ";:IF MON<0 THEN PRINT "LOSING ";:IF MON>0 THEN PRINT "MAKING ";:PRINT ABS (MON);",000";:CALL -868
4050 PRINT
4100 PRINT :PRINT "ELECTRICAL DEMAND (NEED)=";DMND;" MEGAWATTS";:CALL -868
4150 PRINT
4200 PRINT :PRINT "ELECTRICAL OUTPUT=";ELEC;" MEGAWATTS";:CALL -868
4250 PRINT
4300 GOSUB KBI:VTAB 1:GOTO 4000
5000 PRINT :PRINT "DEMAND=";DMND;" MW";:CALL -868
5005 PRINT
5010 PRINT :PRINT "OUTPUT=";ELEC;" MW";:CALL -868
5015 PRINT
5020 PRINT :PRINT TRB;" TURBINES";:CALL -868
5025 PRINT
5030 PRINT :PRINT CAP;" CAPACITORS"
5040 PRINT :PRINT "DEAD=";DEAD;:CALL -868
5045 PRINT
5050 PRINT :PRINT "LEAKS=";LEAK;:CALL -868
5053 PRINT
5055 PRINT :PRINT "PRESSURE=";PRES;:CALL -868
5060 POKE 50,127:VTAB 3:TAB 20:IF TB=1 THEN PRINT "TURBINE"
5070 VTAB 5:TAB 20:IF CB=1 THEN PRINT "CAPACITOR"
5080 VTAB 7:TAB 20:IF LEAK THEN PRINT "LEAK":VTAB 9:TAB 20:IF OVER=1 THEN PRINT "OVERLOAD"
5085 IF ELEC=0 THEN 5086:GOTO 5090
5086 VTAB 11:TAB 20:PRINT "BLACKOUT":GOTO 5095
5090 VTAB 11:TAB 20:IF DMND>ELEC THEN PRINT "BROWNOUT"
5095 VTAB 13:TAB 20:IF DEAD THEN PRINT "DROWNED"
5100 REM FLASHING INDICATORS
5105 VTAB 15:TAB 20:IF PRES>500 THEN PRINT "PRESSURE"
5110 CALL -380
5999 GOSUB KBI:VTAB 1:GOTO 5000
6000 IF DEAD OR LEAK>3 THEN 6020
6010 PRINT "WELL,IF YOU SAY SO! YOU WERE DOING FINE!";
6015 GOTO 6050
6020 PRINT "IT'S ABOUT TIME TOO!"
6030 PRINT "YOU DID TERRIBLY!!!"
6040 PRINT "I SUGGEST YOU IMPROVE YOUR SKILLS(A LOT)";
6050 PRINT
6055 IF LEAK THEN PRINT "YOU HAD ";LEAK;" ";:IF LEAK=1 THEN PRINT "LEAK.":IF LEAK>1 THEN PRINT "LEAKS."
6060 PRINT "YOU KILLED ";DEAD;" ";:IF DEAD=1 THEN PRINT "PERSON";:IF DEAD#1 THEN PRINT "PEOPLE";:PRINT "."
6070 PRINT "YOU ";:IF MON<0 THEN PRINT "LOST ";:IF MON>-1 THEN PRINT "MADE ";:PRINT "$";ABS (MON);
6075 PRINT ",000"
6080 PRINT "TIME WAS ";
6085 PRINT D/10;D MOD 10;"-";H/10;H MOD 10;":";M/10;M MOD 10;:CALL -868
6090 END
7000 PRINT "CATALOG?":CONT=7999:GOSUB KBI:IF K= ASC("Y") THEN PRINT "CATALOG"
7010 PRINT "LOAD OR SAVE?":GOSUB KBI:IF K= ASC("L") THEN 7020:IF K= ASC("S") THEN 7040:OP=1:GOTO 100
7020 GOSUB 7070:PRINT "<CTRL-D>BLOAD ";A$:CONT=10000:GOTO 100
7040 GOSUB 7070:PRINT "<CTRL-D>BSAVE ";A$;",A"; PEEK (74)+256* PEEK (75);",L"; PEEK (204)+256* PEEK (205)-( PEEK (74)+256* PEEK (75))
7050 CONT=10000:GOTO 100
7070 INPUT "FILENAME?",A$:IF A$="" THEN 7050
7080 I= ASC(A$):IF I<193 THEN 7070
7090 RETURN
7999 RETURN
10000 REM THIS HAPPENS EVERY MINUTE
10005 VTAB 24:I= PEEK (-16336)+ PEEK (-16336)
10010 M=M+1:IF M#60 THEN 10030
10020 M=0:H=H+1
10025 CHANGE=1
10030 IF H#24 THEN 10050
10040 H=0:M=0:D=D+1
10045 FOR I=1 TO 5:CALL -198:NEXT I
10047 FOR I=1 TO 50:NEXT I
10050 REM PRINT TIME:DAY-HOUR:MINUTE
10053 TAB 15
10055 PRINT D/10;D MOD 10;"-";H/10;H MOD 10;":";M/10;M MOD 10;:CALL -868
10056 IF OP THEN 10060
10057 FOR I=1 TO WAIT:NEXT I
10059 RETURN
10060 IF LEAK>10 THEN 300
10063 CAP=0
10065 TRB=0:FOR I=1 TO 5:IF TRB(I)=12 THEN TRB=TRB+1:IF CAP(I)=15 THEN CAP=CAP+1:NEXT I:CAP=CAP*VLV:TRB=TRB*VLV
10070 IF F=1 THEN FIX=FIX+1:IF FIX=10 THEN 10080:GOTO 10090
10080 FIX=0:F=0:CALL -198:CALL -198:CALL -198:IF VIEW#1 THEN 10087
10085 COLOR= 15
10086 Y=13:Y=Y+5*(LEAK/10):X=7:X=X+2*(LEAK MOD 10):VLIN Y,Y+4 AT X
10087 LEAK=LEAK-1
10088 UPDTE=1
10090 IF PRES>500 THEN 10095:GOTO 10110
10095 LEAKER=LEAKER+1:IF LEAKER>(25-(PRES/250)*3)-LEAK THEN 10100:GOTO 10110
10100 CALL -198:CALL -198:LEAK=LEAK+1:LEAKER=0:IF VIEW#1 THEN 10110
10105 COLOR= 2
10107 Y=13:Y=Y+5*(LEAK/10):X=7:X=X+2*(LEAK MOD 10):VLIN Y,Y+4 AT X
10110 IF LEAK=0 THEN 10150
10111 IF LEAK<5 THEN W=W+1:IF LEAK<8 THEN W=W+2:IF LEAK>8 THEN W=W+3
10120 IF W<20 THEN 10140
10130 W=0:FOR I=1 TO 6:IF WTER(I)=8 THEN 10135:NEXT I:I=I-1
10135 WTER(I)=2:WTER=WTER+LEAK:IF WTER<50 THEN 10140:IF RND (10)=0 THEN 10136:GOTO 10140
10136 DE= RND (20)+1:DEAD=DEAD+DE:VTAB 23:TAB 1:PRINT DE;" PEOPLE JUST DROWNED! DEAD=";DEAD;:CALL -868
10137 UPDTE=1
10140 IF VIEW#1 THEN 10160
10141 IF LEAK=0 THEN 10150
10145 FOR I=1 TO 6:COLOR= WTER(I):HLIN 5,34 AT I+33:NEXT I
10150 IF LEAK THEN 10160:IF WTER>6 THEN 10160:WTER=WTER-1:IF WTER<0 THEN WTER=0
10151 I=1:IF WTER(I)=2 THEN 10152:FOR I=1 TO 6:IF WTER(I)=2 THEN 10152:NEXT I:GOTO 10160
10152 IF WTER(6)=2 THEN 10153:GOTO 10154
10153 WTER(I)=8:IF VIEW#1 THEN 10160:COLOR= 8:HLIN 5,34 AT I+33:GOTO 10160
10154 FOR I=6 TO 2 STEP -1:WTER(I)=WTER(I-1):NEXT I:WTER(1)=8:IF VIEW#1 THEN 10160
10155 FOR I=1 TO 6
10156 COLOR= WTER(I):HLIN 5,34 AT I+33:NEXT I
10160 ELEC=CAP*250:ELEC=ELEC*PWER:IF DMND>ELEC THEN MON=MON-DMND/150:IF DMND<=ELEC THEN MON=MON+DMND/150
10170 IF CHANGE=1 THEN 10180:GOTO 10190
10180 VTAB 23:TAB 1:IF H<12 THEN DMND=DMND+ RND (55):IF H>11 THEN DMND=DMND- RND (45)
10181 CHANGE=0
10185 CALL -198:CALL -198:CALL -198:CALL -198:PRINT "ELECTRICAL DEMAND=";DMND;" MEGAWATTS";:CALL -868
10186 UPDTE=1
10190 OVER=0:
10200 REM
10210 IF PRES>5000 THEN 300
10230 IF TRB>CAP THEN OVER=1
10240 IF OVER THEN LOAD=LOAD+1
10250 IF LOAD=25 THEN 500
10260 IF NOT OVER AND LOAD THEN LOAD=LOAD-1
10270 REM TURB-BUST
10280 FOR I=1 TO 5:IF TRB(I)=12 AND VLV THEN TURB(I)=TURB(I)+1:NEXT I
10290 FOR I=1 TO 5:IF TURB(I)> RND (50)+299 THEN 10300:IF TURB(I)<0 THEN TURB(I)=-100
10295 IF I>4 THEN 10350
10296 NEXT I:GOTO 10350
10300 TRB(I)=9:UPDTE=1:TB=1
10305 TURB(I)=-100
10310 FOR K=1 TO 4:CALL -198:IF K=2 THEN FOR J=1 TO 50:IF K=2 THEN NEXT J:NEXT K
10320 IF VIEW#2 THEN 10295
10330 GOSUB 2001:GOTO 10295
10350 REM CAPBUST
10360 FOR I=1 TO 5:IF PWER AND CAP(I)=15 THEN CAPA(I)=CAPA(I)+1:IF CAPA(I)> RND (100)+275 THEN 10370:IF CAPA(I)<0 THEN CAPA(I)=-100
10365 IF I>4 THEN 10400
10366 NEXT I:GOTO 10400
10370 CAP(I)=9:FOR K=1 TO 6:CALL -198:IF K=3 THEN FOR J=1 TO 50:IF K=3 THEN NEXT J:NEXT K:CB=1
10371 CAPA(I)=-100
10375 UPDTE=1
10380 IF VIEW#3 THEN 10365
10390 GOSUB 3003
10395 GOTO 10365
10400 REM TURBFIX
10410 IF NOT TFIX THEN 10500
10420 TFIX=TFIX+1
10430 IF TFIX< RND (50)+50 THEN 10500
10440 TURB(TFIX1)=0:TRB(TFIX1)=8:TFIX=0
10445 UPDTE=1:TB=0
10450 FOR I=1 TO 8:CALL -198:IF I=4 THEN FOR J=1 TO 50:IF I=4 THEN NEXT J:NEXT I
10460 IF VIEW#2 THEN 10500
10470 COLOR= 8:FOR J=TFIX1*6 TO TFIX1*6+4:VLIN 3,7 AT J:NEXT J
10480 REM DRAW AN OFF TURBINE
10490 REM OFF="COLOR=8"
10500 REM CAPFIX
10510 IF NOT CFIX THEN 10600:CFIX=CFIX+1:IF CFIX< RND (55)+45 THEN 10600:CFIX=0
10515 CB=0
10520 FOR I=1 TO 10:CALL -198:IF I=5 THEN FOR J=1 TO 50:IF I=5 THEN NEXT J:NEXT I
10525 CAP(CFIX1)=8
10530 IF VIEW#3 THEN 10600
10540 GOSUB 3003
10600 IF NOT TRB THEN PRES=PRES+ RND (10):IF TRB AND PRES THEN PRES=PRES- RND (7):IF PRES<0 THEN PRES=0
10610 RETURN
31245 WAIT=340
32000 MON=0
32005 DMND=175
32010 D=1:H=0:M=0
32020 LEAK=0
32030 DEAD=0
32050 FOR I=1 TO 6
32060 WTER(I)=8
32070 NEXT I
32110 FOR I=1 TO 5
32120 TRB(I)=8
32125 CAP(I)=8
32130 TURB(I)=0:CAPA(I)=0
32135 NEXT I
32140 VLV=0
32145 WAIT=375
32150 REM SWITCHES 1-5 =TURBINES
32160 REM SWITCHES 7-12=CAPACITORS
32170 REM
32180 REM SWITCH 6 =ALL TURBINES
32195 CAP=0:TRB=0:CR=0:TR=0:PR=0:FIX=0:CFIX=0:PFIX=0:TFIX=0
32200 TEXT :CALL -936: POKE -16300,0:CALL -380:NO TRACE
32210 GOSUB 32700
32215 CALL -936
32220 PRINT :PRINT "HOOVER DAM ......"
32230 PRINT :PRINT " YOU ARE RUNNING THE HOOVER DAM ELECTRI-CITY GENERATING FACILITY."
32240 PRINT "THIS IS A TOUGH TASK!"
32245 PRINT
32250 PRINT "DO NOT LET ANY LEAKS BREAK INTO THE DAM!IF THIS HAPPENS ,WATER WILL SEEP THRU AND RUSH TO A";
32260 PRINT " TOWN NEARBY.":PRINT "THIS WILL PROBABLY DROWN PEOPLE!":PRINT " (THAT'S BAD!)"
32270 PRINT :PRINT "VIEWS WILL BE SHOWN GRAPHICLY AND ALSO IN TEXT."
32280 PRINT :PRINT "YOU MAKE/LOSE MONEY BY SUPPLYING ELECTR-ICITY TO THE TOWN."
32305 PRINT
32310 VTAB PEEK (37):PRINT "INITALISE?";:CALL -868
32315 OP=1
32320 F= PEEK (-16384):IF F<128 THEN 32320:IF F= ASC("Y") THEN 32340
32321 POKE -16368,0
32330 GOTO 100
32340 AUT=1:AU=0:A$="2VA3A": POKE -16368,0:GOSUB 200
32700 TAB 13:PRINT "* HOOVER DAM *"
32710 TAB 7:PRINT "** BY GRAHAM A. CHAPMAN **"
32720 PRINT "AN EXCITING LO-RES GAME FOR ALL AGES!"
32730 FOR I=1 TO 1500:NEXT I:RETURN
65525 REM --------------------------
65526 REM ! !
65527 REM ! HOOVER DAM !
65528 REM ! !
65529 REM ! COPYRIGHT (C) 1980 !
65530 REM ! !
65531 REM ! SUPER SOFTWARE !
65532 REM ! !
65533 REM ! BY GRAHAM A. CHAPMAN !
65534 REM ! !
65535 REM --------------------------